/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.gamecenter.sdk.pay.modules;

import android.content.Context;
import android.content.Intent;
import com.qihoo.gamecenter.sdk.common.IDispatcherCallback;
import com.qihoo.gamecenter.sdk.common.d.a.a;
import com.qihoo.gamecenter.sdk.common.g.b;
import com.qihoo.gamecenter.sdk.common.h.d.a;
import com.qihoo.gamecenter.sdk.common.i.i;
import com.qihoo.gamecenter.sdk.common.i.q;
import com.qihoo.gamecenter.sdk.pay.i.b;
import com.qihoo.gamecenter.sdk.pay.j.m;
import com.qihoo.gamecenter.sdk.pay.j.m.a;

public class c implements g.b {
    public void a(Context paramContext, Intent paramIntent, IDispatcherCallback paramIDispatcherCallback) {
        b(paramContext, paramIntent, paramIDispatcherCallback);
    }

    private void b(Context paramContext, Intent paramIntent, IDispatcherCallback paramIDispatcherCallback) {
        com.qihoo.gamecenter.sdk.pay.i.a locala = new com.qihoo.gamecenter.sdk.pay.i.a(paramIntent.getExtras());
        if (b.a(paramContext, paramIntent, locala, true))
            new m(paramContext, new d.a(paramContext, paramIDispatcherCallback, locala) {
                public void a(int paramInt, String paramString, m.a parama) {
                    if (paramInt != 0) {
                        q.a(this.a, com.qihoo.gamecenter.sdk.common.d.a.a(a.a.i), 0, 80);
                        c.a(c.this, this.b, 1, paramString);
                    }
                    else if ((parama != null) && (parama.a())) {
                        this.c.a(parama.d());
                        this.c.d();
                        c.a(c.this, this.b, -2, com.qihoo.gamecenter.sdk.common.d.a.a(a.a.av));
                    }
                    else {
                        c.a(c.this, this.b, 1, com.qihoo.gamecenter.sdk.common.d.a.a(a.a.at));
                    }
                }
            }, paramIntent).execute(new String[] { locala.c() });
        else
            a(paramIDispatcherCallback, 1, com.qihoo.gamecenter.sdk.common.d.a.a(a.a.at));
    }

    private void a(IDispatcherCallback paramIDispatcherCallback, int paramInt, String paramString) {
        if (paramIDispatcherCallback == null)
            return;
        paramIDispatcherCallback.onFinished(i.b(paramInt, paramString, null));
    }
}